﻿using Application.AppService.IConfig;
using AutoMapper;
using Microsoft.AspNetCore.Mvc;

namespace UI.Controllers.MoKuaiYi_第一个模块_.Post_Publication_Management_职位发布管理_
{
    public class EMRSSController : Controller
    {
        private readonly IEngage_major_releaseAppService emrAppService;
        private readonly IMapper mapper;

        public EMRSSController(IEngage_major_releaseAppService emrAppService, IMapper mapper)
        {
            this.emrAppService = emrAppService;
            this.mapper = mapper;
        }
        

        public IActionResult Index()
        {
            return View();
        }

        [HttpPost("GetChancess")]
        public IActionResult GetChancess(int page,int pageSize)
        {
            var totalRecords = emrAppService.GetCount();//获取总行数
            var chances = emrAppService.GetList(page, pageSize);
            return Json(new { TotalRecords = totalRecords, Chances = chances });
        }

    }
}
